class OrderBeauty < ActiveRecord::Base
	has_many :order_beauty_details, dependent: :destroy

	def update_total
       add_item = 0
       order_beauty_details.each do |o|
         add_item = add_item + o.beauty_item.price
       end
       update(total: add_item)
	end
end
